// @ts-nocheck
import http from '@ohos.net.http';
import storage from '@system.storage';

export default {
    data: {
        title: '全国防疫查询',
        tips: '国家卫健委：返乡人员需持7天内核酸检测阴性结果返乡，返乡后实行14天居家健康监测，每7天开展一次核酸检测。',
        show: false,
        url: '',
        cityBean: {},
        form:{
            key:'fa7914d4eec67d44499d2eca5eaea6e1',
            key1:'cd30748cd26060fb22b2193936a99280'
        }
    },
    onInit() {

    },
    initData() {
        this.url = `http://apis.juhe.cn/springTravel/citys?key=${this.form.key}`;
        let httpRequest = http.createHttp();
        httpRequest.request(this.url, {
            method: 'GET',
        }, (err, data) => {
            if (err == null) {
                this.cityBean = data.result;
                console.log('TAG---' + data.result);
            } else {
                console.error('TAG---' + err);
            }
        });
    },
    change(msg) {
        console.error('-------' + msg);

    }
}